package com.orange.handler.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.dbhelp.page.Page;
import com.orange.handler.AuthSchoolContactService;
import com.orange.modules.bean.SchoolContactsBean;
import com.orange.modules.dao.AuthSchoolContactsRepository;
import com.orange.modules.entity.school.AuthSchoolContacts;

@Service
public class AuthSchoolContactServiceImpl implements AuthSchoolContactService{

	@Autowired
	private AuthSchoolContactsRepository authSchoolContactsRepository;

	@Override
	public AuthSchoolContacts queryAuthSchoolContactsBypid(String pid)
			throws SQLException {
		// TODO Auto-generated method stub
		AuthSchoolContacts list = authSchoolContactsRepository.queryAuthSchoolContactsBypid(pid);
		return list;
	}

	@Override
	public Page<AuthSchoolContacts> queryAuthSchoolContactsByPage(
			Integer pageNumber, Integer pageSize, Map<String, String> map)
			throws SQLException {
		// TODO Auto-generated method stub
		Page<AuthSchoolContacts> page = authSchoolContactsRepository.queryAuthSchoolContactsByPage(pageNumber, pageSize, map);
		return page;
	}

	@Override
	public void deleteAuthSchoolContactsBypid(String pid) throws SQLException {
		// TODO Auto-generated method stub
		authSchoolContactsRepository.deleteAuthSchoolContactsBypid(pid);
	}

	@Override
	public void insertAuthSchoolContacts(AuthSchoolContacts ac) throws SQLException {
		// TODO Auto-generated method stub
		authSchoolContactsRepository.insertAuthSchoolContacts(ac);
	}

	@Override
	public void updateAuthSchoolContacts(AuthSchoolContacts as)
			throws SQLException {
		// TODO Auto-generated method stub
		authSchoolContactsRepository.updateAuthSchoolContacts(as);
	}

	@Override
	public AuthSchoolContacts queryAuthSchoolContactsBySchoolId(String schoolId)
			throws SQLException {
		// TODO Auto-generated method stub
		AuthSchoolContacts as = authSchoolContactsRepository.queryAuthSchoolContactsBySchoolId(schoolId);
		return as;
	}

	@Override
	public Page<AuthSchoolContacts> queryAuthContactsBytype(Integer pageNumber,
			Integer pageSize, Map<String, String> map) throws SQLException {
		Page<AuthSchoolContacts> page = authSchoolContactsRepository.queryAuthContactsBytype(pageNumber, pageSize, map);
		return page;
	}

	@Override
	public Page<SchoolContactsBean> queryAuthSchoolContactsBySchool(
			Integer pageNumber, Integer pageSize, Map<String, String> map)
			throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Page<SchoolContactsBean> queryAuthSchoolContactsByPage1(
			Integer pageNumber, Integer pageSize, Map<String, String> map)
			throws SQLException {
		Page<SchoolContactsBean> page = authSchoolContactsRepository.queryAuthSchoolContactsByPage1(pageNumber, pageSize, map);
		return page;
	}

	@Override
	public Page<AuthSchoolContacts> queryAuthSchoolContactsByPage2(
			Integer pageNumber, Integer pageSize, String schoolId, String type)
			throws SQLException {
		Page<AuthSchoolContacts> page = authSchoolContactsRepository.queryAuthSchoolContactsByPage2(pageNumber, pageSize, schoolId, type);
		return page;
	}

	@Override
	public List<AuthSchoolContacts> queryType1BySchool(String schoolId)
			throws SQLException {
		return this.authSchoolContactsRepository.queryType1BySchool(schoolId);
	}

	@Override
	public List<AuthSchoolContacts> queryType2BySchool(String schoolId)
			throws SQLException {
		return this.authSchoolContactsRepository.queryType2BySchool(schoolId);
	}

	
	/**
	 * 级联保存
	 *//*
	@Override
	public void updateSchoolContactsBean(SchoolContactsBean as)
			throws SQLException {
		// TODO Auto-generated method stub
		
	}*/
	
	
	
}
